package com.zxh.system.exception;

import com.zxh.system.domain.ResultCode;

/**
 * 系统异常
 */
public class SystemException extends RuntimeException {
    private ResultCode resultCode;

    public SystemException(ResultCode resultCode) {
        this.resultCode = resultCode;
    }

    public SystemException(String message, ResultCode resultCode) {
        super(message);
        this.resultCode = resultCode;
    }

    public SystemException(String message, Throwable cause, ResultCode resultCode) {
        super(message, cause);
        this.resultCode = resultCode;
    }

    public SystemException(Throwable cause, ResultCode resultCode) {
        super(cause);
        this.resultCode = resultCode;
    }

    public SystemException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, ResultCode resultCode) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.resultCode = resultCode;
    }

    public ResultCode getResultCode() {
        return resultCode;
    }

    public void setResultCode(ResultCode resultCode) {
        this.resultCode = resultCode;
    }
}
